package com.boyinet.demo.pipelineleakage.config;

import com.boyinet.demo.pipelineleakage.corn.CalcJob;
import com.boyinet.demo.pipelineleakage.scheduler.CalcTrigger;
import com.boyinet.demo.pipelineleakage.util.SchedulerUtils;
import org.quartz.Scheduler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SchedulerConfig {

    @Autowired
    public void setScheduler(Scheduler scheduler) {
        SchedulerUtils.setScheduler(scheduler);
    }

    @Autowired
    public void setRemoteHttpTrigger(CalcTrigger calcTrigger) {
        CalcJob.setCalcTrigger(calcTrigger);
    }
}